#ifndef __CONTROLLER_H__
#define __CONTROLLER_H__

typedef struct {
	volatile int newCommandFlag;          //the command is newly issued, actions should be token to the switch status
	volatile unsigned char currentCommand;
	volatile unsigned char SwitchStatus;  //current ON/OFF status
	volatile unsigned char SwitchCommand;   // original ON/OFF command from the server 
	volatile unsigned char controllerstatus;// Status of the interwork\power
	volatile unsigned char ONVoltage[8];    //
	volatile unsigned char OFFVoltage[8];
	volatile unsigned char ChannelVoltage[8];  //the adc value read from the line
	volatile unsigned char SetVoltage[8];
	volatile unsigned short PWMTrigger[8];
}ControllerInfo;

#endif
